<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
<script>
  var arr=[1,2,3,4,5,6,7,7,8,9,9,0,9,8,7,76,55,4,44,33,22,23]
  var rust=[]
  for(var i=0;i<arr.length;i++){
    var idx=Math.floor(i/8)
    if(!rust[idx]){
      rust[idx]=[]
    }
    rust[idx].push(arr[i])
  }
  console.log(rust)
</script>
</body>
</html>
